<include file="__THEME__/public_header" />
<div class="content">
	<div class="wrap">
    	<div class="con_side">
        	<ul class="nav">
            	<li><a href="{:U('admin/Report/show_report_screen')}">市区级报告</a></li>
                <li><a href="{:U('admin/Report/show_garden_reports')}">园级报告</a></li>
                <li><a href="{:U('admin/Report/show_report_evaluate')}">评价报告</a></li>
                <li class="cursor"><a href="{:U('admin/Report/health_advice')}">体质改善方法</a></li>
            </ul>
        </div>
        <div class="con_main">
        	<div class="con_tit">
            	<ul class="con_link">
                    <li class="on"><a href="javascript:;">筛选</a></li>
                    <li><a href="{:U('admin/Report/add_health_advice')}">添加</a></li>
                </ul>
            </div>
            <div class="con_box">
            	<ul class="slect_list2">
                    <li>
                        <div class="txt">锻炼类型：</div>
                        <div class="inp">
                            <select id="advice_type">
                                <option value="">------请选择------</option>
                                <option  value="1">速度</option>
                                <option  value="2">上肢</option>
                                <option  value="3">下肢</option>
                                <option  value="4">平衡</option>
                                <option  value="5">灵敏</option>
                                <option  value="6">柔韧</option>
                                <option  value="7">综合</option>
                            </select>
                        </div>
                    </li>
                </ul>
            	<div class="action_link tc small">
                	<a class="save" href="javascript:select_filter();">确定</a>
                </div>
            </div>
            <div class="con_tit">
                <table class="table table_title t5_2">
                  <tbody><tr>
                    <td>名称</td>
                    <td>所属类型</td>
                    <td>附件</td>
                    <td>操作</td>
                  </tr>
                </tbody></table>
            </div>
            <div class="con_box">
            	<table class="table table_list t5_2 tablehover">
                  <tbody>
                  <if condition="$data['data']">
                  <volist name="data['data']" id="vo">
                    <tr>
                        <td>{$vo.advice_name}</td>
                        <td>
                            <if condition="$vo['advice_type'] eq 1">速度</if>
                            <if condition="$vo['advice_type'] eq 2">上肢</if>
                            <if condition="$vo['advice_type'] eq 3">下肢</if>
                            <if condition="$vo['advice_type'] eq 4">平衡</if>
                            <if condition="$vo['advice_type'] eq 5">灵敏</if>
                            <if condition="$vo['advice_type'] eq 6">柔韧</if>
                            <if condition="$vo['advice_type'] eq 7">综合</if>
                        </td>
                        <td>
                        <a target="_black" href="{$vo.attach_image}"><img src="{$vo.attach_image}" width="200" height="200"></a></td>
                        <td>
                            <a href="JavaScript:delAdvice({$vo.advice_id});">删除</a>
                        </td>
				    </tr>
                   </volist>
                   <else/>
                   暂无改善方法
                   </if>
                </tbody></table>
            </div>
        </div>
    </div>
</div>
<script>
function delAdvice(id){
if(confirm("你确定要删除这个改善建议？")){
    $.ajax({
      type: "POST",
      url:"{:U('admin/Report/delAdvice')}",
      data:"id="+id,
      dataType:"text",
      success:function(data){
        if(isNaN(data)){
            alert(data);
        }else{
            window.location.href=window.location.href;
        }
      }
    });
  }
}
function select_filter(){
  var advice_type=$("#advice_type").val();
  window.location.href="{:U('admin/Report/health_advice')}"+"&advice_type="+advice_type;
}
</script>
<include file="__THEME__/public_footer" />